/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package plar;

/**
 *
 * @author spok
 */
import java.util.HashMap;
public class Action
{

	public String name;
	private Sprites sprites;
        
	// public ActionEvent actionEvent;
	public HashMap properties;
        public Element source;

        public  Action(String n)
	{
		name=n;
                sprites = new Sprites();
	}
        
        public  Action(Element s,String n)
	{
                this(n);	
                source = s;
                
	}
	       public  Action(String n,Element s )
	{
                this(n);	
                source = s;
                
	}
        
               public void clock()
               {
                   sprites.clock();
               }
	public boolean doAction(Event e)
	{
	 // return actionEvent.onEvent(e);
	 return true;
	}
        
        public void addSprite(Sprite s)
        {
            sprites.addSprite(s);
        }
        
        public void setSprites(Sprites s)
        {
            sprites = s;
        }        
        public Sprite getCurrentSprite()
        {
            return sprites.getCurrentSprite();
        }
	
}
